package top.jle.wx.proxy.feign.fans;

import com.alibaba.fastjson2.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(url = "https://api.weixin.qq.com",name="fansTag")
public interface FansTagAPIFeign {

    /**
     * 创建TAG 上限100个
     * @param accessToken
     * @param tag
     * @return
     */
    @PostMapping("/cgi-bin/tags/create")
    JSONObject create(@RequestParam("access_token")String accessToken, @RequestBody JSONObject tag);

    /**
     * 修改TAG
     * @param accessToken
     * @param tag
     * @return
     */
    @PostMapping("/cgi-bin/tags/update")
    JSONObject update(@RequestParam("access_token")String accessToken, @RequestBody JSONObject tag);

    /**
     * 删除TAG
     * @param accessToken
     * @param tag
     * @return
     */
    @PostMapping("/cgi-bin/tags/delete")
    JSONObject delete(@RequestParam("access_token")String accessToken, @RequestBody JSONObject tag);

    /**
     * 获取TAG列表
     * @param accessToken
     * @param tag
     * @return
     */
    @GetMapping("/cgi-bin/tags/get")
    JSONObject get(@RequestParam("access_token")String accessToken);

    /**
     * 给粉丝批量打TAG
     * @param accessToken
     * @param tag
     * @return
     */
    @PostMapping("/cgi-bin/tags/members/batchtagging")
    JSONObject batchTagging(@RequestParam("access_token")String accessToken, @RequestBody JSONObject option);

    /**
     * 批量取消标签
     * @param accessToken
     * @param option
     * @return
     */
    @PostMapping("/cgi-bin/tags/members/batchuntagging")
    JSONObject batchUntagging(@RequestBody JSONObject option);

    /**
     * 根据TAG获取粉丝ID列表
     * @param accessToken
     * @param option
     * @return
     */
    @PostMapping("/cgi-bin/user/tag/get")
    JSONObject getTagFans(@RequestBody JSONObject option);

    /**
     * 获取单个粉丝的TAG ID列表
     * @param accessToken
     * @param option
     * @return
     */
    @PostMapping("/cgi-bin/tags/getidlist")
    JSONObject getFansTagIdList(@RequestBody JSONObject option);
}
